package com.localjoycommunity.cpdj.project.system.domain;

import com.localjoycommunity.cpdj.framework.aspectj.lang.annotation.Excel;
import com.localjoycommunity.cpdj.framework.web.domain.BaseEntity;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 试题对象 sys_question
 *
 * @author leepandar
 * @date 2020-11-01
 */
public class SysQuestion extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long questionId;

    /**
     * 问题名称
     */
    @Excel(name = "问题名称")
    private String title;

    /**
     * 问题类型
     */
    @Excel(name = "问题类型")
    private String type;

    /**
     * 正确答案，单选和判断为选项表中的id，多选用逗号隔开
     */
    @Excel(name = "正确答案，单选和判断为选项表中的id，多选用逗号隔开")
    private String correctOption;

    /**
     * 原文解析
     */
    @Excel(name = "原文解析")
    private String analysis;

    /**
     * 问题分数
     */
    @Excel(name = "问题分数")
    private Long score;

    /**
     * 试题选项
     */
    private List<SysOption> options = new ArrayList<>();

    /**
     * 试卷id
     */
    private Long paperId;

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    public Long getQuestionId() {
        return questionId;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setCorrectOption(String correctOption) {
        this.correctOption = correctOption;
    }

    public String getCorrectOption() {
        return correctOption;
    }

    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    public String getAnalysis() {
        return analysis;
    }

    public void setScore(Long score) {
        this.score = score;
    }

    public Long getScore() {
        return score;
    }

    public Long getPaperId() {
        return paperId;
    }

    public void setPaperId(Long paperId) {
        this.paperId = paperId;
    }

    public List<SysOption> getOptions() {
        return options;
    }

    public void setOptions(List<SysOption> options) {
        this.options = options;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("questionId", getQuestionId())
                .append("title", getTitle())
                .append("correctOption", getCorrectOption())
                .append("analysis", getAnalysis())
                .append("score", getScore())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
